package com.wise.site.widget;

import com.wise.site.R;
import com.wise.site.protocol.result.Adv;
import com.wise.site.protocol.result.AdvSuper;
import com.wise.site.utils.ImageLoader;
import com.wise.site.utils.ImageLoader.Imager;

import android.content.Context;
import android.content.Intent;
import android.util.AttributeSet;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageView;

/*********************************************************
 * @author : zhaohua
 * @version : 2012-8-21
 * @see : 广告图片
 * @Copyright : copyrights reserved by personal 2007-2011
 **********************************************************/
public class AdvView extends ImageView 
{
    private static final String TAG = "AdvView";
    private Adv mData;
     
    public AdvView(Context context)
    {
        super(context);
    }
   
    public AdvView(Context context, AttributeSet attrs)
    {
        super(context, attrs);
    }
   
    public void bindData(Adv data)
    {
    	if(data == null){
    		return;
    	}
        this.mData = data;
        int size = getResources().getDimensionPixelSize(R.dimen.flow_adv_height);
//                getResources().getDimensionPixelSize(R.dimen.sin_adv_height);
        ImageLoader.getInstance().DisplayImage(new Imager(mData.imageUrl, this, size, 0));
    }
    
	public Adv getData() {
		return mData;
	}
    
    
}
